﻿using System.Xml.Serialization;

namespace ElectronicCommerce.Framework.Web.Configuration.Website
{
    public class ResourceSiteConfig
    {
        #region fields images site
        private string cssHttpSite = "";
        private string cssHttpsSite = "";
        private string jsHttpSite = "";
        private string jsHttpsSite = "";
        private string jsUEDHttpSite = "";
        private string jsUEDHttpsSite = "";
        private string imageHttpSite = "";
        private string imageHttpsSite = "";
        #endregion

        #region css cache server for resources
        /// <summary>
        /// Gets or sets the HTTP cache resource server with no trailing '/' or '\'.
        /// </summary>
        /// <value>The HTTP cache resource server.</value>
        [XmlElement("cssHttpSite")]
        public string CssHttpSite
        {
            get { return cssHttpSite; }
            set { cssHttpSite = value.TrimEnd(' ', '/', '\\'); }
        }
        /// <summary>
        /// Gets or sets the HTTPS cache resource server with no trailing '/' or '\'.
        /// </summary>
        /// <value>The HTTPS cache resource server.</value>
        [XmlElement("cssHttpsSite")]
        public string CssHttpsSite
        {
            get { return cssHttpsSite; }
            set { cssHttpsSite = value.TrimEnd(' ', '/', '\\'); }
        }

        #endregion

        #region js cache server for resources
        /// <summary>
        /// Gets or sets the HTTP cache resource server with no trailing '/' or '\'.
        /// </summary>
        /// <value>The HTTP cache resource server.</value>
        [XmlElement("jsHttpSite")]
        public string JsHttpSite
        {
            get { return jsHttpSite; }
            set { jsHttpSite = value.TrimEnd(' ', '/', '\\'); }
        }
        /// <summary>
        /// Gets or sets the HTTPS cache resource server with no trailing '/' or '\'.
        /// </summary>
        /// <value>The HTTPS cache resource server.</value>
        [XmlElement("jsHttpsSite")]
        public string JsHttpsSite
        {
            get { return jsHttpsSite; }
            set { jsHttpsSite = value.TrimEnd(' ', '/', '\\'); }
        }
        #endregion

        #region js cache server for resources
        /// <summary>
        /// Gets or sets the HTTP cache resource server with no trailing '/' or '\'.
        /// </summary>
        /// <value>The HTTP cache resource server.</value>
        [XmlElement("jsUEDHttpSite")]
        public string JsUEDHttpSite
        {
            get { return jsUEDHttpSite; }
            set { jsUEDHttpSite = value.TrimEnd(' ', '/', '\\'); }
        }
        /// <summary>
        /// Gets or sets the HTTPS cache resource server with no trailing '/' or '\'.
        /// </summary>
        /// <value>The HTTPS cache resource server.</value>
        [XmlElement("jsUEDHttpsSite")]
        public string JsUEDHttpsSite
        {
            get { return jsUEDHttpsSite; }
            set { jsUEDHttpsSite = value.TrimEnd(' ', '/', '\\'); }
        }
        #endregion

        #region image cache server for resources
        /// <summary>
        /// Gets or sets the HTTP cache resource server with no trailing '/' or '\'.
        /// </summary>
        /// <value>The HTTP cache resource server.</value>
        [XmlElement("imageHttpSite")]
        public string ImageHttpSite
        {
            get { return imageHttpSite; }
            set { imageHttpSite = value.TrimEnd(' ', '/', '\\'); }
        }
        /// <summary>
        /// Gets or sets the HTTPS cache resource server with no trailing '/' or '\'.
        /// </summary>
        /// <value>The HTTPS cache resource server.</value>
        [XmlElement("imageHttpsSite")]
        public string ImageHttpsSite
        {
            get { return imageHttpsSite; }
            set { imageHttpsSite = value.TrimEnd(' ', '/', '\\'); }
        }

        #endregion

    }
}
